<?php

class TestController extends MyController
{	
	function init()
	{
		parent::init();
		$this->controller_id = $this->getId();
		$this->data["controller_id"] = $this->controller_id;
	}
	
	function actionAbc()
	{
		echo $this->controller_id;
		//echo $this->host_name;
		echo Yii::app()->getRequest()->getUserHost();
		echo $this->getAction()->getId();
	}
	
	function actionIndex()
	{	
		// Create an email transport
		
		$mailer = new YiiMail;
		$mailer->transportType = 'smtp';
		$mailer->transportOptions = array(
			'host'=>'localhost',
			'username'=>'support@laptopsaigon.vn',
			'password'=>'123456',
			//'port'=>'25',
			//'encryption'=>'ssl',
		);
		
		$from = "support@laptopsaigon.vn";
		$to = "phminh017@gmail.com";
		$subject = "test mail smtp";
		$body = "test bang IP address";
		
		$mailer->sendSimple($from, $to, $subject, $body);
		echo "Sending ...";
	}	
	
	

}